//package cn.xspace.wnx.db;
//
//import java.util.ArrayList;
//
//import cn.xspace.wnx.entity.WNXBean;
//import rx.Observable;
//import rx.Subscriber;
//
///**
// * Wubj 创建于 2017/1/6 0006.
// */
//public class WNXMessageListDao {
//    private static WNXMessageListDao instance;
//    public static final String TABLE_NAME = "t_wnx_list";
//    public static final String COLUMN_TIME_STAMP = "inserttime";
//    /**
//     * 0：通知公告；1：微农信；2：单聊；3：群聊
//     */
//    public static final String COLUMN_MSG_TYPE = "msg_type";
//    public static final String COLUMN_MSG_LOGO = "msg_logo";
//    public static final String COLUMN_MSG_SENDER_ID = "msg_sender_id";
//    public static final String COLUMN_MSG_SENDER_NAME = "msg_sender_name";
//    public static final String COLUMN_MSG_RECEIVER_ID = "msg_receiver_id";
//    public static final String COLUMN_MSG_RECEIVER_NAME = "msg_receiver_name";
//    public static final String COLUMN_MSG_UNREAD_COUNT = "msg_unread_count";
//    public static final String COLUMN_MSG_WARN_STATUS = "msg_warn_status";
//    public static final String COLUMN_MSG_LAST_TIME = "msg_last_time";
//    public static final String COLUMN_MSG_CONTENT_TYPE = "msg_content_type";
//    public static final String COLUMN_MSG_CONTENT = "msg_content";
//    public static final String COLUMN_MSG_SEND_STATUS = "msg_send_status";
//    public static final String COLUMN_MSG_GROUP_ID = "msg_group_id";
//    public static final String COLUMN_MSG_GROUP_NAME = "msg_group_name";
//    public static final String COLUMN_MSG_GROUP_MEMBER = "msg_group_members";
//    public static final String COLUMN_USER_SEX = "user_sex";
//    public static final String COLUMN_MSG_INDEX = "msg_index";
//    public static final String COLUMN_MSG_IS_SHOW = "msg_is_show";
//    public static final String COLUMN_MSG_GROUP_TYPE = "msg_group_type";
//    //    public static final String COLUMN_MSG_GROUP_MEMBER = "msg_group_member";
//    public static final String COLUMN_REMARK1 = "remark1";
//    public static final String COLUMN_REMARK2 = "remark2";
//    public static final String COLUMN_REMARK3 = "remark3";
//
//    public static WNXMessageListDao getInstance() {
//        if (instance == null) {
//            instance = new WNXMessageListDao();
//        }
//        return instance;
//    }
//
//    public static final String WNX_LIST_TABLE_CREATE = "CREATE TABLE  IF NOT EXISTS "
//            + WNXMessageListDao.TABLE_NAME
//            + " (_ID INTEGER PRIMARY KEY AUTOINCREMENT,"
//            + WNXMessageListDao.COLUMN_TIME_STAMP + " TEXT,"
//            + WNXMessageListDao.COLUMN_MSG_TYPE + " INTEGER,"
//            + WNXMessageListDao.COLUMN_MSG_LOGO + " TEXT,"
//            + WNXMessageListDao.COLUMN_MSG_SENDER_ID + " TEXT,"
//            + WNXMessageListDao.COLUMN_MSG_SENDER_NAME + " TEXT,"
//            + WNXMessageListDao.COLUMN_MSG_RECEIVER_ID + " TEXT,"
//            + WNXMessageListDao.COLUMN_MSG_RECEIVER_NAME + " TEXT,"
//            + WNXMessageListDao.COLUMN_MSG_UNREAD_COUNT + " INTEGER,"
//            + WNXMessageListDao.COLUMN_MSG_WARN_STATUS + " INTEGER,"
//            + WNXMessageListDao.COLUMN_MSG_LAST_TIME + " TEXT,"
//            + WNXMessageListDao.COLUMN_MSG_CONTENT_TYPE + " INTEGER,"
//            + WNXMessageListDao.COLUMN_MSG_CONTENT + " TEXT,"
//            + WNXMessageListDao.COLUMN_MSG_SEND_STATUS + " INTEGER,"
//            + WNXMessageListDao.COLUMN_MSG_GROUP_ID + " TEXT,"
//            + WNXMessageListDao.COLUMN_MSG_GROUP_NAME + " TEXT,"
//            + WNXMessageListDao.COLUMN_MSG_GROUP_TYPE + " INTEGER,"
//            + WNXMessageListDao.COLUMN_MSG_GROUP_MEMBER + " INTEGER,"
//            + WNXMessageListDao.COLUMN_USER_SEX + " TEXT,"
//            + WNXMessageListDao.COLUMN_MSG_INDEX + " INTEGER,"
//            + COLUMN_MSG_IS_SHOW + " INTEGER,"
//            + WNXMessageListDao.COLUMN_REMARK1 + " TEXT,"
//            + WNXMessageListDao.COLUMN_REMARK2 + " TEXT,"
//            + WNXMessageListDao.COLUMN_REMARK3 + " INTEGER)";
//
//    public Observable<String> saveWNXList(final ArrayList<WNXBean> beanList) {
//        return Observable.create(new Observable.OnSubscribe<String>() {
//            @Override
//            public void call(Subscriber<? super String> subscriber) {
//                try {
//                    WNXDBManager.getInstance().saveWNXList(beanList);
//                    subscriber.onNext("success");
//                    subscriber.onCompleted();
//                } catch (Exception e) {
//                    e.printStackTrace();
//                    subscriber.onError(e);
//                }
//
//            }
//        });
//    }
//}
